#pragma once

#include <stdint.h>
#include <stdbool.h>

typedef struct battery battery_t;
struct battery
{
    uint32_t adc_channel;                          /* adc 通道 */
    double (*get_voltage_percentage)(battery_t *); /* 获取电量百分比 */
};

bool battery_init(battery_t *battery);
bool battery_deinit(battery_t *battery);
